import { Router } from 'express';
import { CourseController } from '../controllers/course.controller';

const router = Router();
const courseController = new CourseController();

router.get('/', (req, res) => courseController.getCourses(req, res));
router.get('/search', (req, res) => courseController.searchCourses(req, res));
router.get('/:id', (req, res) => courseController.getCourseById(req, res));
router.post('/favorite', (req, res) => courseController.toggleFavorite(req, res));

export default router;
